#include "stm32f10x.h"

void delay_us(unsigned int delay)
{
	SysTick->LOAD = 72 * delay;
	SysTick->CTRL = 0x00000005;
	while(!(SysTick->CTRL & 0x00010000));
	SysTick->CTRL = 0x00000004;
}

void delay_ms(unsigned int delay)
{
	while(delay--)
	{
		delay_us(1000);
	}
}

void delay_s(unsigned int delay)
{
	while(delay--)
	{
		delay_ms(1000);
	}
}
